﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="AnyOffice.general.rms.lend_stat.index" %>

<%@ Register TagPrefix="Webdiver" Namespace="Webdiver" Assembly="AspnetPager" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title></title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<script language="JavaScript">
function open_file(file_id)
{
 URL="read_file.aspx?file_id="+file_id;
 myleft=(screen.availWidth-500)/2;
 mytop=150
 mywidth=550;
 myheight=400;
 window.open(URL,"read_roll","height="+myheight+",width="+mywidth+",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
</script>
	</HEAD>
	<body class="bodycolor" topMargin="5">
		<form id="Form1" method="post" runat="server">
			<table class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<tr>
					<td class="Big" width="40%">
						<img src="/images/notify_open.gif" align="absMiddle"><span class="big3"> 文件统计</span>
					</td>
					<td>
					</td>
					<td vAlign="bottom" width="60%">
						<asp:literal id="litNavCount" runat="server"></asp:literal>&nbsp;&nbsp;&nbsp;&nbsp;
						<asp:literal id="litNavPager" runat="server"></asp:literal>
					</td>
				</tr>
			</table>
			<BR>
			<asp:panel id="pnlMain" runat="server">
				<TABLE class="small" cellSpacing="1" cellPadding="3" width="100%" bgColor="#000000" border="0">
					<TR class="TableHeader">						
						<TD noWrap align="center">文件号</TD>
						<TD noWrap align="center">文件标题</TD>
						<TD noWrap align="center">密级</TD>
						<TD noWrap align="center">发文单位</TD>
						<TD noWrap align="center">发文日期</TD>
						<TD noWrap align="center">所属案卷</TD>
						<TD noWrap align="center">借阅次数</TD>
					</TR>
					<asp:Repeater id="rptRmsFile" runat="server">
					<ItemTemplate>
						<tr class="TableLine1">
							<td align="center"><a href="javascript:open_file('<%#Eval("FileId")%>');"><%#Eval("FileCode")%></a></td>
							<td align="center"><%#Eval("FileTitle")%></td>
							<td align="center"><%#Eval("Secret") != DBNull.Value ? GetCodeName(Eval("Secret").ToString(), "Secret") : ""%></td>
							<td align="center"><%#Eval("SendUnit")%></td>
							<td align="center"><%#Eval("SendDate") != DBNull.Value ? Convert.ToDateTime(Eval("SendDate").ToString()).ToString("yyyy-MM-dd") : ""%></td>
							<td align="center"><%#Eval("RollId") != DBNull.Value ? GetRollName(Convert.ToInt32(Eval("RollId").ToString())) : ""%></td>
							<td align="center"><%#GetLendNums(Convert.ToInt32(Eval("FileId").ToString()))%></td>					
						</tr>
					</ItemTemplate>
					<AlternatingItemTemplate>
						<tr class="TableLine2">
							<td align="center"><a href="javascript:open_file('<%#Eval("FileId")%>');"><%#Eval("FileCode")%></a></td>
							<td align="center"><%#Eval("FileTitle")%></td>
							<td align="center"><%#Eval("Secret") != DBNull.Value ? GetCodeName(Eval("Secret").ToString(), "Secret") : ""%></td>
							<td align="center"><%#Eval("SendUnit")%></td>
							<td align="center"><%#Eval("SendDate") != DBNull.Value ? Convert.ToDateTime(Eval("SendDate").ToString()).ToString("yyyy-MM-dd") : ""%></td>
							<td align="center"><%#Eval("RollId") != DBNull.Value ? GetRollName(Convert.ToInt32(Eval("RollId").ToString())) : ""%></td>
							<td align="center"><%#GetLendNums(Convert.ToInt32(Eval("FileId").ToString()))%></td>					
						</tr>
					</AlternatingItemTemplate>
					</asp:Repeater>					
				</TABLE>
				<TABLE class="small" cellSpacing="0" cellPadding="0" width="100%">
								<TR>									
									<TD align="right">
										<WEBDIVER:ASPNETPAGER id="AspNetPager1" runat="server" CssClass="small1" InputBoxClass="SmallInput" SubmitButtonClass="SmallButton"
											Font-Size="10pt" OnPageChanged="ChangePage" HorizontalAlign="Right" ShowCustomInfoSection="left" ShowInputBox="Always"
											SubmitButtonText="转到" NumericButtonTextFormatString="[{0}]" UrlPaging="True" CustomInfoSectionWidth="35%"
											PagingButtonSpacing="0" ImagePath="../images" ButtonImageNameExtension="n" CpiButtonImageNameExtension="r"
											DisabledButtonImageNameExtension="g" PageSize="10" AlwaysShow="True"></WEBDIVER:ASPNETPAGER></WEBDIVER:ASPNETPAGER></TD>
								</TR>
							</TABLE>
			</asp:panel>
			<asp:literal id="litMessage" runat="server"></asp:literal>
		</form>
	</body>
</HTML>
